package com.estate.utils;

public class LendingAuthorStateUtil {
	
	public static String getAuthorStateString(int authorStateInt){
		String authorStateString="";
		switch(authorStateInt){
		case 1:
			authorStateString="已归还";
			break;
		case 2:
			authorStateString="待批准";
			break;
		case 3:
			authorStateString="未批准";
			break;
		case 4:
			authorStateString="已批准";
			break;
		}
		return authorStateString;
	}

	public static int getAuthorStateInt(String authorStateString){
		int authorStateInt=0;
		if("待批准".equals(authorStateString)){
			authorStateInt=1;
		} else if("未批准".equals(authorStateString)){
			authorStateInt=2;
		} else if("已批准".equals(authorStateString)){
			authorStateInt=3;
		} else if("已归还".equals(authorStateString)){
			authorStateInt=4;
		}
		return authorStateInt;
	}
}
